import { loginApi } from '../services/user';

export default {

  namespace: 'login',

  state: {},

  subscriptions: {
    setup({ dispatch, history }) {  // eslint-disable-line
    },
  },

  effects: {
    *login({ payload }, { call }) {
      const { userName, password } = payload;
      const { data } = yield call(loginApi, {
        username: userName,
        password,
      });
      console.log('...fadfa', data);
    },
  },

  reducers: {
  },

};
